using Microsoft.Kinect;
using System;
using System.Collections.Generic;

namespace KinectLibrary.DTWGestureRecognition
{
    public class Gesture
    {
        private readonly List<Frame> frames;

        public Gesture(string name, string speech) : this()
        {
            Name = name;
            Speech = speech;
        }

        public Gesture(IEnumerable<Frame> frames)
        {
            this.frames = new List<Frame>(frames);
        }

        public Gesture()
        {
            frames = new List<Frame>();
        }

        public void AddFrame(Frame frame)
        {
            this.frames.Add(frame);
        }

        public List<Frame> Frames { get { return frames; } }
        public Frame LastFrame { get { return frames[frames.Count - 1]; } }

        private string name;
        public string Name { get { return string.IsNullOrEmpty(name) ? "NO_NAME" : name; } set { name = value; } }

        public string Speech { get; set; }
    }
}